#ifndef STACK_H_INCLUDED
#define STACK_H_INCLUDED
#include "ChessNode.h"
using namespace std;

struct StackNode
{
public:
    ChessNode* value;
    StackNode* next;
    StackNode():value(nullptr),next(nullptr){}
    StackNode(ChessNode* value):next(nullptr)
    {
        this->value = value;
    }
};

class Stack
{
private:
    StackNode* first;
    int size_;
public:
    Stack();
    ~Stack();
    ChessNode* pop();
    void push(ChessNode *p);
    bool isempty();
};

#endif // STACK_H_INCLUDED
